﻿<!Doctype html>

<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=11">
    <title>全国安置帮教工作信息管理系统</title>
    <script src="/webjars/miniui/boot.js" type="text/javascript"></script>
    <link href="/static/css/resource.css" rel="stylesheet" type="text/css" />
    <script src="/static/js/common/public.js" type="text/javascript"></script>
    <link rel="stylesheet" href="/static/css/main-page/g-reset.css" />
    <link href="/webjars/miniui/res/third-party/scrollbar/jquery.mCustomScrollbar.css" rel="stylesheet" type="text/css" />
    <script src="/webjars/miniui/res/third-party/scrollbar/jquery.mCustomScrollbar.concat.min.js" type="text/javascript"></script>
    <link href="/webjars/miniui/frame/menu/menu.css" rel="stylesheet" type="text/css" />
    <script src="/webjars/miniui/frame/menu/menu.js" type="text/javascript"></script>
    <script src="/webjars/miniui/frame/menutip.js" type="text/javascript"></script>
    <script src="/static/js/common/index.js" type="text/javascript"></script>
    <link href="/webjars/miniui/frame/tabs.css" rel="stylesheet" type="text/css" />
    <link href="/webjars/miniui/frame/frame.css" rel="stylesheet" type="text/css" />
    <link href="/webjars/miniui/frame/index.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="/static/css/main-page/home.css" />
    <script type="text/javascript" src="/static/js/main-page/echarts.min.js"></script>
    <script type="text/javascript" src="/static/js/main-page/messageNotification.js"></script>
    <style type="text/css">
        html, body {
            width:100%;
            height:100%;
            margin:0;
            padding:0;
        }
        body {
            background:#F5F7FA;
            background-size:100% 100%;
        }
        .mini-splitter-border {
            border:0;
        }
        .mini-splitter-pane1 {
            border-right:0;
            border-bottom:0;
        }
        .chart {
            width:100%;
            height:100%;
            box-sizing:border-box;
        }
        .left {
            width:100%;
            height:0px;
            padding-bottom:45%;
        }
        #mainMenu a {
            color:#fff !important;
        }
        .navbar {
            background:#fff;
        }
        .sidebar {
            background:transparent;
        }
        .wrap {
            width:50px;
            margin-bottom:10px;
            position:relative;
        }
        .img {
            width:50px;
            height:50px;
            border:0px solid #000;
        }
        .notice {
            width:24px;
            height:24px;
            line-height:24px;
            font-size:12px;
            color:beige;
            text-align:center;
            background-color:#f00;
            border-radius:50%;
            position:absolute;
            right:-5px;
            top:12px;
        }
        .live {
            overflow:hidden;
        }
        .live > li {
            list-style:none;
            position:relative;
            padding:0 0 0 1em;
            margin:0 0 .5em 10px;
            -webkit-transition:.12s;
            transition:.12s;
        }
        .live > li::before {
            position:absolute;
            content:'\2022';
            font-family:Arial;
            color:#00adee;
            top:0;
            left:0;
            text-align:center;
            font-size:2em;
            opacity:.5;
            line-height:.75;
            -webkit-transition:.5s;
            transition:.5s;
        }
        .live > li:hover {
            color:#00a60a;
        }
        .live > li:hover::before {
            -webkit-transform:scale(2);
            -ms-transform:scale(2);
            transform:scale(2);
            opacity:1;
            text-shadow:0 0 4px;
            -webkit-transition:.1s;
            transition:.1s;
        }
        .live.numbers {
            counter-reset:xxx 0;
        }
        .live.numbers > li::before {
            content:counter(xxx, decimal) ".";
            counter-increment:xxx 1;
            font-family:'Roboto Condensed';
            font-size:1em;
            opacity:.5;
            line-height:1.4;
            -webkit-transition:.5s;
            transition:.5s;
        }
        .live.numbers > li:hover:before {
            opacity:1;
            left:-10px;
            -webkit-transform:none;
            -ms-transform:none;
            transform:none;
            text-shadow:none;
            -webkit-transition:.12s;
            transition:.12s;
        }
        .live {
            width:95%;
            display:inline-block;
            text-align:left;
            vertical-align:middle;
            background:ivory;
            color:rgba(255, 255, 255, 0.5);
            border-radius:8px;
            padding:1em;
            margin:1.1%;
            box-shadow:0 0 1px rgba(0, 0, 0, 0.2);
            font-size:14px;
            font-family:"Segoe UI";
        }
        .right {
            position:fixed;
            bottom:0;
        }
        #choiceWindow {
            display:none;
            position:absolute;
            top:25%;
            left:25%;
            width:30%;
            height:55%;
            padding:20px;
            border:3px solid #ccc;
            background-color:white;
            z-index:2;
            overflow:auto;
        }
        #backGround {
            display:none;
            position:absolute;
            top:0%;
            left:0%;
            width:100%;
            height:1100px;
            background-color:black;
            z-index:1;
            -moz-opacity:0.8;
            opacity:.80;
            filter:alpha(opacity=88);
        }
        #x:hover {
            cursor:pointer;
            color:rgb(55, 198, 192);
        }
        #i123.change::-webkit-input-placeholder {
            color:red;
        }
        #editform1 {
            width:100%;
            padding:0;
            margin:0;
        }
        caption {
            padding:0 0 5px 0;
            width:700px;
            font:italic 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
            text-align:right;
        }
        th {
            font:bold 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
            color:#4f6b72;
            border-right:1px solid #C1DAD7;
            border-bottom:1px solid #C1DAD7;
            border-top:1px solid #C1DAD7;
            letter-spacing:2px;
            text-transform:uppercase;
            text-align:left;
            padding:6px 6px 6px 12px;
            background:#CAE8EA no-repeat;
        }
        th.nobg {
            border-top:0;
            border-left:0;
            border-right:1px solid #C1DAD7;
            background:none;
        }
        th.spec {
            border-left:1px solid #C1DAD7;
            border-top:0;
            background:#fff no-repeat;
            font:bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
        }
        th.specalt {
            border-left:1px solid #C1DAD7;
            border-top:0;
            background:#f5fafa no-repeat;
            font:bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
            color:#797268;
        }
        /*button样式*/
        .button {
            width:140px;
            line-height:20px;
            text-align:center;
            color:#fff;
            text-shadow:1px 1px 1px #333;
            border-radius:5px;
            position:relative;
            overflow:hidden;
        }
        .button:nth-child(6n) {
            margin-right:0;
        }
        .button.gray {
            color:#8c96a0;
            text-shadow:1px 1px 1px #fff;
            border:1px solid #dce1e6;
            box-shadow:0 1px 2px #fff inset, 0 -1px 0 #a8abae inset;
            background:-webkit-linear-gradient(top, #f2f3f7, #e4e8ec);
            background:-moz-linear-gradient(top, #f2f3f7, #e4e8ec);
            background:linear-gradient(top, #f2f3f7, #e4e8ec);
        }
        .button.black {
            border:1px solid #333;
            box-shadow:0 1px 2px #8b8b8b inset, 0 -1px 0 #3d3d3d inset, 0 -2px 3px #8b8b8b inset;
            background:-webkit-linear-gradient(top, #656565, #4c4c4c);
            background:-moz-linear-gradient(top, #656565, #4a4a4a);
            background:linear-gradient(top, #656565, #4a4a4a);
        }
        .button.red {
            border:1px solid #b42323;
            box-shadow:0 1px 2px #e99494 inset, 0 -1px 0 #954b4b inset, 0 -2px 3px #e99494 inset;
            background:-webkit-linear-gradient(top, #d53939, #b92929);
            background:-moz-linear-gradient(top, #d53939, #b92929);
            background:linear-gradient(top, #d53939, #b92929);
        }
        .button.yellow {
            border:1px solid #d2a000;
            box-shadow:0 1px 2px #fedd71 inset, 0 -1px 0 #a38b39 inset, 0 -2px 3px #fedd71 inset;
            background:-webkit-linear-gradient(top, #fece34, #d8a605);
            background:-moz-linear-gradient(top, #fece34, #d8a605);
            background:linear-gradient(top, #fece34, #d8a605);
        }
        .button.green {
            border:1px solid #64c878;
            box-shadow:0 1px 2px #b9ecc4 inset, 0 -1px 0 #6c9f76 inset, 0 -2px 3px #b9ecc4 inset;
            background:-webkit-linear-gradient(top, #90dfa2, #84d494);
            background:-moz-linear-gradient(top, #90dfa2, #84d494);
            background:linear-gradient(top, #90dfa2, #84d494);
        }
        .button.blue {
            border:1px solid #1e7db9;
            box-shadow:0 1px 2px #8fcaee inset, 0 -1px 0 #497897 inset, 0 -2px 3px #8fcaee inset;
            background:-webkit-linear-gradient(top, #42a4e0, #2e88c0);
            background:-moz-linear-gradient(top, #42a4e0, #2e88c0);
            background:linear-gradient(top, #42a4e0, #2e88c0);
        }
        /* 123 */
        .marquee {
            width:100%;
            margin:0 auto;
            overflow:hidden;
            white-space:nowrap;
            box-sizing:border-box;
            animation:marquee 30s linear infinite;
        }
        .marquee:hover {
            animation-play-state:paused
        }
        /* Make it move */
        @keyframes marquee {
            0% {
                text-indent:15.5em
            }
            100% {
                text-indent:-90em
            }
        }
        /* Make it pretty */
        .microsoft {
            padding-left:1.5em;
            position:relative;
            font:12px 'Segoe UI', Tahoma, Helvetica, Sans-Serif;
            color:rgb(102, 102, 102);
            background:rgb(255, 248, 233) none repeat scroll 0% 0%;
        }
        /* ::before was :before before ::before was ::before - kthx */
        .microsoft:before,
        .microsoft::before {
            z-index:2;
            content:'';
            position:absolute;
            top:-1em;
            left:-1em;
            width:.5em;
            height:.5em;
        }
        .microsoft:after,
        .microsoft::after {
            z-index:1;
            content:'';
            position:absolute;
            top:0;
            left:0;
            width:1.4em;
            height:1.4em;
            background-size:18px 18px;
        }
        #um_das-bar-close {
            position:inherit;
            top:50%;
            transform:translateY(-56%);
            width:2%;
            height:42px;
            text-align:center;
            line-height:24px;
            font-size:24px;
            cursor:pointer;
            color:#fff;
            float:right;
            border-right-width:10px;
        }

    </style>
</head>
<body>
<!-- 顶部通知 -->
<div class="microsoft marquee" id="um_das-bar-wrap" style="color:#d93f3f;font-size:larger">
    ${topContent!'暂无更新信息'}
</div>
<!-- 行政区划搜索 -->
<#--<span id="um_das-bar-close" style="color:red">x</span>-->
<!-- hidden：暂时关闭行政区划搜索功能 -->
<button id="btn" style="position: fixed; top: 75%; right:30px; z-index:9999" class="button blue" hidden>行政区划搜索</button>

<div id="choiceWindow" style="position: fixed; top: 12%; right:35px; z-index:5000; width:30%;" class="mini-fit">
    <label id="x" style="position: absolute;top:2px;left: 95%;font-size: 25px;">x</label>
    <div <#--class="mini-fit"--> style="margin-bottom: 1px">
        <div style="height:75%;width: 100%;overflow-x: auto;overflow-y: auto;">
            <form id="form1" method="post" style="margin-top: 10px;">
                <div id="editform" <#--class="form" -->>
                    <table style="width:100%;border:0">
                        <tr>
                            <td style="border:0"><font color="#dc143c">*</font><font style="font-size:14px">行政区划:</font></td>
                            <td style="border:0">
                                <input id="i123" name="username" type="text" onchange="onValueChanged1()" placeholder="输入要搜索的关键字" />
                            </td>
                            <td style="border:0">
                                <button type="button" id="yazbtn" onclick="showSearchBtn(2)" autocomplete="off" class="button blue">搜索</button>
                            </td>
                        </tr>
                    </table>
                </div>
            </form>
            <div id="editform2" style="white-space:pre;margin-top: 2px;">
                <table id="editform1" width="100%"></table>
            </div>
        </div>
    </div>
</div>
<!-- 问题管理 -->
<div>
    <button id="wenti" style="position: fixed; top: 80%; right:30px; z-index:9999" class="button green" onclick="saveProblem()" hidden>添加问题描述</button>
</div>
<!-- 顶部横向菜单、logo、用户头像等 -->
<div class="navbar">
    <div class="navbar-header" style="cursor:default;">
        <#if "${localCode !''}"=='140000'>
            <div style="width:100%;line-height: 135px;"><img style="width:99%;top: 50%;" src="/static/images/system-logo-sx.svg" alt=""></div>
            <#else>
            <div style="width:100%;line-height: 135px;"><img style="width:99%;top: 50%;" src="/static/images/system-logo.svg" alt=""></div>
        </#if>
    </div>
    <ul id="aaaa1" class="nav navbar-nav navbar-right" style="margin-right: 0">
        <li style="line-height: 100px;font-size: 34px;padding: 0 10px;color: #2165e0;">|</li>
        <#if (user.level=='01') || (user.level=='02') || (user.level=='05') || (user.level=='03') || (user.level=='07') || (user.level=='08') || (user.level=='06')>
            <li id="aliclass" class="dropdown" style="
                height: 90px;
                left: 0px;
                bottom: 0px;
                top: 0px;
            ">
                <a id='aaaaa' class="dropdown-toggle userinfo" onclick="showWindow()" style="height:85px; right:0px;">
                    <div class="wrap">
                        <div class="img" style="padding-top:20px">
                            <img class="user-img" width="42" src="../static/images/notice.png" />
                        </div>
                        <!-- 铃铛上面红色的数字 -->
                        <div class="notice" id="remindAll">
                            ${remindAll!"0"}
                        </div>
                    </div>
                </a>
            </li>
        </#if>
        <li class="dropdown">
            <a class="dropdown-toggle userinfo">
                <img class="user-img" src="data:image;base64,${avatar!''}" alt="666" />
            </a>
            <ul class="dropdown-menu pull-right">
                <iframe src="" frameborder="0"
                        style="position: absolute; top: 0; left: 0;width: 100%;height: 100%;"></iframe>
                <div class="userInfoBox">
                    <img src="data:image;base64,${avatar!''}" alt="" />
                    <p class="">用户名：${user.username}</p>
                    <div><span>部门：${user.departName}</span>
<#--                        <span>${user.positionName}</span>-->
                    </div>
                </div>
                <ul class="czBox clearfix">
                    <li class="fl" onclick="userInfo()">用户信息</li>
                    <li class="fl" onclick="changepwd()">修改密码</li>
                    <a href="/logout">
                        <li class="fl">退出登录</li>
                    </a>
                </ul>
            </ul>
        </li>
    </ul>
    <!-- 资源菜单管理 - 加载首页导航栏菜单  -->
    <div class="fr" style="text-align: right;">
        <ul class="nav-parent-wrap clearfix" style="width: 636px;">
        </ul>
    </div>
</div>

<!-- main主页面 -->
<div class="container">
    <div class="main">
        <div id = "cccccccccc" class="mini-tabs top-tabs" activeIndex="0" tabAlign="center" width="100%" height="99%" plain="false" style="margin-top: 3px">
            <div title="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;工&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;作&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;预&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;览&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" class="home-wrapper" id="mainclass" showCloseButton="false" enabled="true">
                <iframe id="addFrame" src="" width="100%" height="98%" frameborder="0"></iframe>
            </div>
            <#if user.level != '1'&& user.level != '3'>
                <!-- 根据不同的角色展示  -->
                <div title="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;工&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;作&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;台&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" class="home-wrapper" id="mainclass" showCloseButton="false" enabled="true">
                    <iframe id="addFrame1" src="" width="100%" height="98%" frameborder="0"></iframe>
                </div>
            </#if>
        </div>
        <div class="home-except-box" id="mainclass1">
            <div class="left-nav">
                <div class="nav-child-wrap">
                    <div>
                    </div>
                </div>
            </div>
            <div class="tab-wrapper">
                <div id="mainTabs" class="mini-tabs main-tabs" activeIndex="0" style="height:100%;" plain="false"
                     buttons="#tabsButtons" arrowPosition="side" contextMenu="#tabsMenu" onactivechanged="tabsBoxIsHide()">
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 工作提醒 -->
<div id="win1" class="mini-window" title="工作提醒" style="width:500px;height:80%;border-radius:20px;"
     showMaxButton="false" AllowsTransparency=true;
     showToolbar="true" showFooter="true" showModal="false" allowResize="false" allowDrag="true" showCloseButton="false">
    <div id="outlookbar1" class="mini-outlookbar" activeIndex="0" style="width:100%;height:95%;border-radius:15px;" autoCollapse="true">
        <#if user.level=='01'>
            <div title="待发起核查" style="border-radius:15px">
                <ul class="dialog-box1 clearfix">

                </ul>
            </div>
            <div title="待发起衔接" style="border-radius:15px">
                <ul class="dialog-box3 clearfix">

                </ul>
            </div>
        </#if>
        <#if user.level=='02'>
            <div title="待发起核查" style="border-radius:15px">
                <ul class="dialog-box1 clearfix">

                </ul>
            </div>
            <div title="待发起衔接" style="border-radius:15px">
                <ul class="dialog-box3 clearfix">

                </ul>
            </div>
        </#if>
        <#if user.level=='05'>
            <div title="待发起核查" style="border-radius:15px">
                <ul class="dialog-box1 clearfix">

                </ul>
            </div>
            <div title="待发起衔接" style="border-radius:15px">
                <ul class="dialog-box3 clearfix">

                </ul>
            </div>
        </#if>
        <#if user.level=='03'>
            <div title="待完成核查" style="border-radius:15px">
                <ul class="dialog-box2 clearfix">

                </ul>
            </div>

            <div title="待完成衔接" style="border-radius:15px">
                <ul class="dialog-box4 clearfix">

                </ul>
            </div>

            <div title="今日已解除帮教" style="border-radius:15px">
                <ul class="dialog-box6 clearfix">

                </ul>
            </div>
            <#if "${localCode !''}"=='140000'>
                <div title="户籍迁出被拒绝">
                    <ul class="dialog-box9 clearfix">

                    </ul>
                </div>
                <div title="户籍迁出被迁入地司法所接收">
                    <ul class="dialog-box10 clearfix">

                    </ul>
                </div>
                <div title="户籍迁入待接收">
                    <ul class="dialog-box11 clearfix">

                    </ul>
                </div>
            </#if>
        </#if>
        <#if user.level=='07' || user.level=='06'>
            <div title="待办工作" style="border-radius:15px">
                <ul class="dialog-box5 clearfix">

                </ul>
            </div>
        </#if>
        <#if user.level=='08'>
            <div title="待办工作" style="border-radius:15px">
                <ul class="dialog-box5 clearfix">

                </ul>
            </div>
            <div title="今日已解除帮教" style="border-radius:15px">
                <ul class="dialog-box6 clearfix">

                </ul>
            </div>
            <#if "${localCode !''}"=='140000'>
                <div title="户籍迁出申请">
                    <ul class="dialog-box7 clearfix">
                    </ul>
                </div>
                <div title="户籍迁入申请">
                    <ul class="dialog-box8 clearfix">

                    </ul>
                </div>
                <div title="户籍迁出被拒绝">
                    <ul class="dialog-box9 clearfix">

                    </ul>
                </div>
            </#if>
        </#if>
    </div>
    <input type="hidden" value="${level!''}" id="level"/>
</div>
<!-- 关闭所有菜单 -->
<ul id="tabsMenu" class="mini-contextmenu" onbeforeopen="onBeforeOpen">
    <li onclick="closeAllButFirst">关闭所有</li>
</ul>
</body>
</html>
<script type="text/javascript">
    //0、------------------------------初始化变量------------------------------
    mini.parse();
    var level = '${user.level!""}';
    //工作提醒相关变量
    var account = '${user.account!""}';
    var hidden = false;
    var win = mini.get("win1");
    var wenti = mini.get("wenti");
    var queryNameObj = mini.get("queryName");
    var flag = 0;
    var num = 1;
    var isChanged = ${isChanged!"1"};
    var qzChangePassword = ${qzChangePassword!"false"};
    var tabs = mini.get("mainTabs");
    var currentTab = null;

    //1、------------------------------顶部通知滚动条------------------------------
    /**
     * 单击顶部通知滚动条
     */
    document.getElementById("um_das-bar-wrap").onclick = function () {
        document.getElementById("um_das-bar-wrap").style.display = "none";
        var addFrame = document.getElementById("addFrame").contentWindow;
        var ifmObj1 = addFrame.document.getElementById("b1");
        var ifmObj2 = addFrame.document.getElementById("b2");
        var ifmObj3 = addFrame.document.getElementById("b3");
        var ifmObj4 = addFrame.document.getElementById("b4");
        var ifmObj5 = addFrame.document.getElementById("b5");
        ifmObj1.classList.remove("tab-active");
        ifmObj2.classList.remove("tab-active");
        ifmObj3.classList.remove("tab-active");
        ifmObj4.classList.remove("tab-active");
        ifmObj5.classList.add("tab-active");
        getMessageList("getXttzList");
        setCookie(account + "updateInfo_cookie", "123", 1000);
        $("#mainclass").css("top", "0px");
        $("#mainclass1").css("top", "0px");
    }

    //设置cookie
    function setCookie(name, value, expires) {
        var exp = new Date();
        exp.setTime(exp.getTime() + expires * 3600000);
        document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString();
    }

    //获取cookie
    function getCookie(name) {
        var arr = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)"));
        if (arr != null) return unescape(arr[2]);
        return false;
    }

    //2、------------------------------行政区划搜索------------------------------
    /**
     * 行政区划搜索移除样式
     */
    function onValueChanged1() {
        $("#yazbtn1").remove();
    }

    /**
     * 行政区划搜索
     * @param e
     */
    function showSearchBtn(e) {
        var i123v = document.getElementById("i123").value;
        if (i123v == "") {
            $('#i123').addClass('infoTextarea change');
            return;
        }
        if (e == 2) {
            num = 1;
            $("#editform1").empty();
        }
        mini.mask({
            el: document.getElementById("choiceWindow"),
            cls: 'mini-mask-loading',
            html: '加载中...'
        });
        $.ajax({
            url: "/azbj/bjdxInfo/hjqr/addPrisonerMv/getOrgList?key=" + i123v + "&num=" + num,
            type: "post",
            success: function (data) {
                if (data === '') {
                    mini.unmask(document.getElementById("choiceWindow"));
                    $("#yazbtn1").remove();
                    $("#nodatashow").remove();
                    $("#editform1").parent().append("<div id=\"nodatashow\"><font color=\"#dc143c\">没有更多数据</font><div>");
                    return;
                }
                $("#nodatashow").remove();
                var str = "";
                num = num + 1;
                mini.unmask(document.getElementById("choiceWindow"));
                if (data == '') {
                    $("#yazbtn1").remove();
                    $("#editform1").empty();
                    $("#editform1").append("结果为空");
                    return;
                }
                for (var i = 0; i < data.length; i++) {
                    str = str + "<tr><th>" + data[i] + "\n" + "</th></tr></>";
                }
                var b = "<button type=\"button\" id=\"yazbtn1\" onclick=\"showSearchBtn(1)\" autocomplete=\"off\" class=\"button blue\" style=\"display:block;margin:0 auto\">加载更多</button>";
                $("#yazbtn1").remove();
                $("#editform1").append(str);
                $("#editform1").parent().append(b);
            }
        });
    }

    //3、------------------------------问题管理------------------------------
    /**
     *跳转添加问题页面
     */
    function saveProblem() {
        var data = null;
        mini.open({
            // targetWindow: window,
            url: "/basic/resource/problem/topopup/view",
            title: "添加问题",
            width: 700,
            targetWindow: window,
            height: 700,
            allowDrag: true,
            allowResize: true,
            showCloseButton: true,
            showModal: false,
            onload: function () {
                if (data != null && data != "") {
                    var iframe = this.getIFrameEl();
                    iframe.contentWindow.SetData(data);
                }
                $("#wenti").hide();
            },
            ondestroy: function (action) {
                $("#wenti").show();
                if (typeof callback === "function") {
                    var options = {};
                    for (var i = 6; i < args.length; i++) {
                        options[i - 6] = args[i];
                    }
                    if (options.length == 0) {
                        callback(action);
                    } else {
                        callback(action, options);
                    }
                }
            }
        });
    }

    //4、------------------------------背景------------------------------
    /**
     * 设置背景
     */
    function setBg() {
        $.ajax({
            url: '/azbj/background/getBackgroundData',
            type: 'GET',
            dataType: 'json',
            success: function (data) {
                var data = data.data;
                for (var i = 0, len = data.length; i < len; i++) {
                    if (data[i].isUsed == "1") {
                        if (data[i].isDefault == "1") {
                            $('body').css({
                                "background": "url(/static/images/" + data[i].serverUrl + ")",
                                "background-size": "100% 100%"
                            });
                        } else {
                            $('body').css({
                                "background": "url(/azbj/bjdxInfo/hjqc/toViewTabs/view/readPartImage?url=" + data[i].serverUrl + ")",
                                "background-size": "100% 100%"
                            });
                        }
                    }
                }
            }
        })
    }

    //5、------------------------------tab页面切换------------------------------
    /**
     * 激活tab页
     * @param item
     */
    function activeTab(item) {
        var tabs = mini.get("mainTabs");
        var tab = tabs.getTab(item.id);
        if (!tab) {
            var url = item.url + "?id=" + item.id;
            tab = {name: item.id, title: item.text, url: url, iconCls: item.iconCls, showCloseButton: true};
            tab = tabs.addTab(tab);
        }
        tabs.activeTab(tab);
        var childWindow = $("#addFrame")[0].contentWindow; //表示获取了嵌入在iframe中的子页面的window对象。  []将JQuery对象转成DOM对象，用DOM对象的contentWindow获取子页面window对象。
        remove_zIndex();
    }

    // 获取tab页签的长度
    function getTabsLength() {
        var tabs = mini.get("mainTabs");
        var thelength = tabs.getTabs().length;
        return thelength
    }

    //控制tab页是否显示或隐藏
    function tabsBoxIsHide() {
        if (flag == 1) {
            flag = 0;
            return;
        }
        if (getTabsLength() > 0) {
            var tabs = mini.get("mainTabs");
            var currentTabId = tabs.getActiveTab().name;
            $('.nav-child-wrap ul li').removeClass('active');
            $('[data-id=' + currentTabId + ']').addClass('active');
            $('.home-except-box').show();
            $('.top-tabs').hide();
            $('.home-wrapper').stop().animate({opacity: 0}, 50);
            $('.nav-parent-wrap li').removeClass('nav-active');
            $('.nav-parent-wrap li').eq(headerNavIndex).addClass('nav-active');
        } else {
            $('.home-except-box').hide();
            $('.top-tabs').show();
            $('.home-wrapper').animate({opacity: 1}, 100);
            $('.nav-parent-wrap li').removeClass('nav-active');
            $('.nav-parent-wrap li').eq(0).addClass('nav-active');
        }
    }

    /**
     * 关闭出当前之前tab页
     * @param e
     */
    function onBeforeOpen(e) {
        currentTab = tabs.getTabByEvent(e.htmlEvent);
    }

    /**
     * 关闭除第一个之外tab页
     */
    function closeAllButFirst() {
        var but = tabs.getTab("index");
        tabs.removeAll(but);
    }

    //6、------------------------------用户信息------------------------------
    // 点击显示用户信息
    function userInfo() {
        if(${localCode} == '140000') {
            mini.open({
                url: "/basic/user/user-info/view",
                allowResize: false,
                title: "修改个人信息",
                width: 700,
                height: 500,
                onload: function () {
                    var data = {
                        action: "new"
                    };
                },
                ondestroy: function (action) {
                }
            });
        } else{
            mini.open({
                url: "/basic/user/user-info/view",
                allowResize: false,
                title: "修改个人信息",
                width: 550,
                height: 350,
                onload: function () {
                    var data = {
                        action: "new"
                    };
                },
                ondestroy: function (action) {
                }
            });
        }
    }

    //7、------------------------------修改密码------------------------------
    // 修改密码
    function changepwd() {
        mini.open({
            url: "/basic/user/user-changepwd/view",
            allowResize: false,
            title: "修改密码",
            width: 400,
            height: 300,
            onload: function () {
                var data = {
                    action: "new"
                };
            },
            ondestroy: function (action) {
            }
        })
    }

    //8、------------------------------页面初始化------------------------------
    /**
     * 页面初始化 -- 页面一加载
     */
    $(function () {
        //在页面初始化再给src赋值，避免iframe二次请求浪费资源
        $("#addFrame").attr("src","/basic/main");
        $("#addFrame1").attr("src","/basic/work");
        //8.1、------------------------------强制修改密码------------------------------
        //暂时关闭强制修改密码false,开启改成true
        if (qzChangePassword == true && isChanged == '0') {
            mini.open({
                url: "/basic/user/user-first-changepwd/view",
                allowResize: false,
                showCloseButton: false,
                title: "首次登陆或长时间未修改密码，请修改密码后重新登陆",
                width: 450,
                height: 300,
                onload: function () {
                    var data = {
                        action: "new"
                    };
                },
                ondestroy: function (e) {
                    return false;
                }
            })
        }
        //8.2、------------------------------行政区划搜索------------------------------
        $("#btn").click(function () {
            $("#choiceWindow").slideDown(300);
            $("#backGround").show();
        });
        $("#x").click(function () {
            $("#editform1").empty();
            $("#i123").val("");
            num = 1;
            $('#i123').removeClass('infoTextarea change');
            $("#choiceWindow").slideUp(300);
            $("#backGround").hide();
        })
        //8.3、------------------------------顶部通知滚动条------------------------------
        var cookie = getCookie(account + "updateInfo_cookie");
        //有本地缓存不展示
        if (cookie) {
            var updateInfo = document.getElementById("um_das-bar-wrap");
            updateInfo.style.display = "none";
            $("#mainclass").css("top", "0px");
            $("#mainclass1").css("top", "0px");
        } else {
            //无本地缓存展示
            $("#mainclass").css("top", "20px");
            $("#mainclass1").css("top", "20px");
        }
        $(document).mousemove(function (e) {
            if (!!this.move) {
                var posix = !document.move_target ? {'x': 0, 'y': 0} : document.move_target.posix,
                    callback = document.call_down || function () {
                        $(this.move_target).css({
                            'top': e.pageY - posix.y,
                            'left': e.pageX - posix.x
                        });
                    };
                callback.call(this, e, posix);
            }
        }).mouseup(function (e) {
            if (!!this.move) {
                var callback = document.call_up || function () {
                };
                callback.call(this, e);
                $.extend(this, {
                    'move': false,
                    'move_target': null,
                    'call_down': false,
                    'call_up': false
                });
            }
        });
        var $box = $('.box').mousedown(function (e) {
            var offset = $(this).offset();
            this.posix = {'x': e.pageX - offset.left, 'y': e.pageY - offset.top};
            $.extend(document, {'move': true, 'move_target': this});
        }).on('mousedown', '.coor', function (e) {
            var fBox = $(this).parent();
            var posix = {
                'w': fBox.width(),
                'h': fBox.height(),
                'x': e.pageX,
                'y': e.pageY
            };
            $.extend(document, {
                'move': true, 'call_down': function (e) {
                    fBox.css({
                        'width': Math.max(30, e.pageX - posix.x + posix.w),
                        'height': Math.max(30, e.pageY - posix.y + posix.h)
                    });
                }
            });
            return false;
        });
        //8.4、------------------------------根据分辨率的大小调整字体的大小------------------------------
        /**
         * 根据分辨率的大小调整字体的大小
         * */
        styleQ("14px", "20px", "18px", "16px");     //传入参数为 字体尺寸
        $(window).resize(function () {
            styleQ("14px", "20px", "18px", "16px");     //传入参数为 字体尺寸
        });

        /**
         * 根据分辨率的大小调整字体的大小
         * */
        function styleQ(defaultFont, font1, font2, font3) {
            var screenWidth = document.documentElement.clientWidth;
            if (screenWidth > 1600) {
                $(".nav-parent-wrap").css({
                    "font-size": font1,
                    "width": "1020px"
                })
            } else if (screenWidth <= 1600 && screenWidth > 1440) {
                $(".nav-parent-wrap").css({
                    "font-size": font2,
                    "width": "860px"
                })
            } else if (screenWidth <= 1440 && screenWidth > 1280) {
                $(".nav-parent-wrap").css({
                    "font-size": font3,
                    "width": "752px"
                })
            } else {
                $(".nav-parent-wrap").css({
                    "font-size": defaultFont,
                    "width": "752px"
                });
            }
        }

        //8.5、------------------------------设置背景------------------------------
        setBg();
        //8.6、------------------------------资源菜单管理------------------------------
        var menu = new Menu("#mainMenu", {
            itemclick: function (item) {
                if (!item.children || item.children.length == 0) {
                    activeTab(item);
                }
            }
        });
        $(".sidebar").mCustomScrollbar({autoHideScrollbar: true});
        new MenuTip(menu);
        $.ajax({
            url: "/basic/resource/menu",
            success: function (text) {
                var data = mini.decode(text);
                navData(data);
            }
        })

        function navData(data) {
            var pDom = '';
            var childDom = '';
            for (var i = 0, len = data.length; i < len; i++) {
                if (i == data.length - 1) {
                    pDom += '<li class="nav-active" data-id="' + data[i].id + '"><i class="' + data[i].iconCls + '"></i><div>' + data[i].text + '</div></li>';
                    childDom += '<ul class="active">';
                } else {
                    pDom += '<li data-id="' + data[i].id + '"><i class="' + data[i].iconCls + '"></i><div>' + data[i].text + '</div></li>';
                    childDom += '<ul>';
                }
                for (var j = 0; j < data[i].children.length; j++) {
                    childDom += '<li data-id="' + data[i].children[j].id + '" data-text="' + data[i].children[j].text + '" data-iconCls="' + data[i].children[j].iconCls + '" data-url="' + data[i].children[j].url + '"><i class="' + data[i].children[j].iconCls + '"> </i> ' + data[i].children[j].text + '</li>'
                }
                childDom += '</ul>'
            }

            $('.nav-parent-wrap').html(pDom);
            $('.nav-child-wrap>div').html(childDom);
        }

        // 二级菜单打开tab页
        $('.nav-child-wrap>div').on('click', 'li', function () {
            var item = {};
            item.iconCls = $(this).attr('data-iconCls');
            item.id = $(this).attr('data-id');
            item.url = $(this).attr('data-url');
            item.text = $(this).attr('data-text');
            activeTab(item);
        })
        //toggle
        $("#toggle, .sidebar-toggle").click(function () {
            $('body').toggleClass('compact');
            mini.layout();
        });
        //dropdown
        $(".dropdown-toggle").click(function (event) {
            if ($(this).parent().hasClass("open")) {
                $(this).parent().removeClass("open");
            } else {
                $(this).parent().addClass("open");
            }
            return false;
        });
        $(document).click(function (event) {
            $(".dropdown").removeClass("open");
        });
        tabsBoxIsHide();
        //8.7、------------------------------初始化查询工作提醒------------------------------
        /**
         * 初始化查询工作提醒
         */
        /**
         * 07:地市司法局
         * 08：区县司法局
         * 03：司法所
         * 01：监狱
         * 05：社矫中心
         * 02：看守所
         */
        if ((level == '01' || level == '02' || level == '03' || level == '07' || level == '06' || level == '08' || level == '05') && account != 'sfbadmin' && account != 'gabadmin') {
            $(function () {
                mini.parse();
                if (level == '01' || level == '02' || level == '05') {
                    // 查询监狱需要核查任务
                    getDialogListHc();
                    getDialogListXj();
                }
                if (level == '03') {
                    getDialogListDoHc();
                    getDialogListDoXj();
                    getDialogListDoJc();
                    if(${localCode} == '140000') {
                        a333();
                        a444();
                        a2221();
                    }
                }
                if ((level == '07' || level == '06') && account != 'sfbadmin' && account != 'gabadmin') {
                    //查询地市/司法厅待办工作
                    selectCountDoSb();
                }
                if (level == '08' && account != 'sfbadmin' && account != 'gabadmin') {
                    //查询区县待办工作、今日已解除帮教
                    selectCountDoSb();
                    getDialogListDoJc();
                    if(${localCode} == '140000') {
                        a111();
                        a222();
                    }
                }
                // 查询小铃铛右上角条数
                $.ajax({
                    url: "/azbj/notice/remind",
                    type: "GET",
                    dataType: "json",
                    success: function (data) {
                        if (data) {
                            remindAll = data.remindAll;
                            if (remindAll == '0') {
                                document.getElementById("remindAll").textContent = '0';
                                document.getElementById("remindAll").style.display = "none";
                            } else if (remindAll == '100') {
                                document.getElementById("remindAll").textContent = '99+';
                            } else {
                                document.getElementById("remindAll").textContent = remindAll;
                            }
                        }
                    }
                });
            });
        }
        //每1分钟刷新一次工作提醒 60000
        /*if ((level == '1' || level == '2' || level == '3') && account!='sfbadmin' && account!='gabadmin') {
            $(function () {
                setInterval(aa, 60000);
                function aa() {
                    $.ajax({
                        url: "/azbj/notice/remind",
                        type: "GET",
                        dataType: "json",
                        success: function (data) {
                            if (data) {
                                remindAll = data.remindAll;
                                if (remindAll == '0') {
                                    document.getElementById("remindAll").textContent = '0';
                                    document.getElementById("remindAll").style.display = "none";
                                } else {
                                    document.getElementById("remindAll").textContent = remindAll;
                                }
                            }
                        }
                    });
                    if (level == '1' || level == '2') {
                        getDialogListHc();
                        getDialogListXj();
                    }
                    if (level == '3') {
                        getDialogListDoHc();
                        getDialogListDoXj();
                    }
                }
            })
        }*/
    });

    //9、------------------------------点击小铃铛-工作提醒相关------------------------------
    function showWindow() {
        if ((level == '01' || level == '02' || level == '05') && account != 'sfbadmin' && account != 'gabadmin') {
            getDialogListHc();
            getDialogListXj();
        }
        if (level == '03' && account != 'sfbadmin' && account != 'gabadmin') {
            getDialogListDoHc();
            getDialogListDoXj();
            getDialogListDoJc();
            if(${localCode} == '140000') {
                a333();
                a444();
                a2221();
            }
        }
        if ((level == '06' || level == '07') && account != 'sfbadmin' && account != 'gabadmin') {
            //查询地市的需要完成上报的任务
            selectCountDoSb();
        }
        if (level == '08' && account != 'sfbadmin' && account != 'gabadmin') {
            //查询区县的需要完成上报的任务、今日已解除帮教任务
            selectCountDoSb();
            getDialogListDoJc();
            if(${localCode} == '140000') {
                a222();
                a333();
            }
        }

        $.ajax({
            url: "/azbj/notice/remind",
            type: "GET",
            dataType: "json",
            success: function (data) {
                if (data) {
                    remindAll = data.remindAll;
                    if (remindAll == '0') {
                        document.getElementById("remindAll").textContent = '0';
                        document.getElementById("remindAll").style.display = "none";
                    } else if (remindAll == '100') {
                        document.getElementById("remindAll").textContent = '99+';
                    } else {
                        document.getElementById("remindAll").textContent = remindAll;
                    }
                }
            }
        });
        hidden = !hidden;
        if (!hidden) {
            $("#win1").hide();
            return;
        }
        win.showAtPos("right", "middle");
        $(document).one("click",
            function () { //对document绑定一个影藏Div方法
                hidden = false;
                $("#win1").hide();
                flag = 0;
            });
        event.stopPropagation();//阻止事件向上冒泡
    }

    $("#win1").click(function (event) {
        flag = 1;
        event.stopPropagation(); //阻止事件向上冒泡
    });

    var IframeOnClick = {
        resolution: 200,
        iframes: [],
        interval: null,
        Iframe: function () {
            this.element = arguments[0];
            this.cb = arguments[1];
            this.hasTracked = false;
        },
        track: function (element, cb) {
            this.iframes.push(new this.Iframe(element, cb));
            if (!this.interval) {
                var _this = this;
                this.interval = setInterval(function () {
                    _this.checkClick();
                }, this.resolution);
            }
        },

        checkClick: function () {
            if (document.activeElement) {
                var activeElement = document.activeElement;
                for (var i in this.iframes) {
                    if (activeElement === this.iframes[i].element) { // user is in this Iframe
                        if (this.iframes[i].hasTracked == false) {
                            this.iframes[i].cb.apply(window, []);
                            this.iframes[i].hasTracked = true;
                        }
                    } else {
                        this.iframes[i].hasTracked = false;
                    }
                }
            }
        }
    };

    // 监听点击事件
    IframeOnClick.track(document.getElementById("addFrame"), function () {
        if (hidden) {
            hidden = !hidden;
            $("#win1").hide();
            //设置新的class名
            document.getElementById('aliclass').className = 'dropdown';
        }
    });

    function toHc() {
        $("li[data-id='40000']").click();
        flag = 1;
        closeAllButFirst();
        if (hidden) {
            hidden = !hidden;
            $("#win1").hide();
        }
        if (level == '05') {
            var item = {
                iconCls: "fa fa-bell-o",
                id: "253387361878016",
                text: "在矫人员信息录入",
                url: "/basic/public-tab/view",
            };
            var tabs = mini.get("mainTabs");
            var tab = tabs.getTab(item.id);
            if (!tab) {
                var url = item.url + "?id=" + item.id;
                tab = {name: item.id, title: item.text, url: url, iconCls: item.iconCls, showCloseButton: true};
                tabs.addTab(tab);
                $("li[data-id='40000']").parent().parent().children().removeClass('nav-active');
            }
            tabs.activeTab(tab);
            $("li[data-id='40000']").parent().children().removeClass('nav-active');
            $("li[data-id='40000']").addClass('nav-active');
            $('.home-except-box').show();
            $('.home-wrapper').stop().animate({opacity: 0}, 50);
            $('.nav-child-wrap ul li').removeClass('active');
            $("li[data-id='253387361878016']").parent().parent().children().removeClass('active');
            $("li[data-id='253387361878016']").parent().addClass('active');
            $("li[data-id='253387361878016']").addClass('active');
            document.getElementById('aliclass').className = 'dropdown';
        } else {
            var item = {
                iconCls: "fa fa-bell-o",
                id: "246736930521088",
                text: "预安置人员信息录入",
                url: "/basic/public-tab/view",
            };
            var tabs = mini.get("mainTabs");
            var tab = tabs.getTab(item.id);
            if (!tab) {
                var url = item.url + "?id=" + item.id;
                tab = {name: item.id, title: item.text, url: url, iconCls: item.iconCls, showCloseButton: true};
                tabs.addTab(tab);
                $("li[data-id='40000']").parent().parent().children().removeClass('nav-active');
                document.getElementById("cccccccccc").style.display = "none";
            }
            tabs.activeTab(tab);
            $("li[data-id='40000']").parent().children().removeClass('nav-active');
            $("li[data-id='40000']").addClass('nav-active');
            $('.home-except-box').show();
            $('.home-wrapper').stop().animate({opacity: 0}, 50);
            $('.nav-child-wrap ul li').removeClass('active');
            $("li[data-id='246736930521088']").parent().parent().children().removeClass('active');
            $("li[data-id='246736930521088']").parent().addClass('active');
            $("li[data-id='246736930521088']").addClass('active');
            document.getElementById('aliclass').className = 'dropdown';
            document.getElementById("cccccccccc").style.display = "none";
        }
    }

    function toDoHc() {
        $("li[data-id='40000']").click();
        flag = 1;
        closeAllButFirst();
        if (hidden) {
            hidden = !hidden;
            $("#win1").hide();
        }
        var item = {
            iconCls: "fa fa-bell-o",
            id: "246736963534848",
            text: "预安置人员核查",
            url: "/basic/public-tab/view"
        };
        var tabs = mini.get("mainTabs");
        var tab = tabs.getTab(item.id);
        if (!tab) {
            var url = item.url + "?id=" + item.id;
            tab = {name: item.id, title: item.text, url: url, iconCls: item.iconCls, showCloseButton: true};
            tabs.addTab(tab);
            $("li[data-id='40000']").parent().parent().children().removeClass('nav-active');
            document.getElementById("cccccccccc").style.display = "none";
        }
        tabs.activeTab(tab);
        $("li[data-id='40000']").parent().children().removeClass('nav-active');
        $("li[data-id='40000']").addClass('nav-active');
        $('.home-except-box').show();
        $('.home-wrapper').stop().animate({opacity: 0}, 50);
        $('.nav-child-wrap ul li').removeClass('active');
        $("li[data-id='246736963534848']").parent().parent().children().removeClass('active');
        $("li[data-id='246736963534848']").parent().addClass('active');
        $("li[data-id='246736963534848']").addClass('active');
        document.getElementById('aliclass').className = 'dropdown';
        document.getElementById("cccccccccc").style.display = "none";
    }

    // 更多核查信息
    function toDoHcSfj() {
        $("li[data-id='40000']").click();
        flag = 1;
        closeAllButFirst();
        if (hidden) {
            hidden = !hidden;
            $("#win1").hide();
        }
        var item = {
            iconCls: "fa fa-bell-o",
            id: "246736963534848",
            text: "预安置人员核查",
            url: "/basic/public-tab/view"
        };
        var tabs = mini.get("mainTabs");
        var tab = tabs.getTab(item.id);
        if (!tab) {
            var url = item.url + "?id=" + item.id;
            tab = {name: item.id, title: item.text, url: url, iconCls: item.iconCls, showCloseButton: true};
            tabs.addTab(tab);
            $("li[data-id='40000']").parent().parent().children().removeClass('nav-active');
            document.getElementById("cccccccccc").style.display = "none";
        }
        tabs.activeTab(tab);
        $("li[data-id='40000']").parent().children().removeClass('nav-active');
        $("li[data-id='40000']").addClass('nav-active');
        $('.home-except-box').show();
        $('.home-wrapper').stop().animate({opacity: 0}, 50);
        $('.nav-child-wrap ul li').removeClass('active');
        $("li[data-id='246736963534848']").parent().parent().children().removeClass('active');
        $("li[data-id='246736963534848']").parent().addClass('active');
        $("li[data-id='246736963534848']").addClass('active');
        document.getElementById('aliclass').className = 'dropdown';
        document.getElementById("cccccccccc").style.display = "none";
    }

    function toXj() {
        $("li[data-id='40000']").click();
        flag = 1;
        closeAllButFirst();
        if (hidden) {
            hidden = !hidden;
            $("#win1").hide();
        }
        var item = {
            iconCls: "fa fa-bell-o",
            id: "246736969695232",
            text: "预释放人员衔接",
            url: "/basic/public-tab/view"
        };
        var tabs = mini.get("mainTabs");
        var tab = tabs.getTab(item.id);
        if (!tab) {
            var url = item.url + "?id=" + item.id;
            tab = {name: item.id, title: item.text, url: url, iconCls: item.iconCls, showCloseButton: true};
            tabs.addTab(tab);
            $("li[data-id='40000']").parent().parent().children().removeClass('nav-active');
            document.getElementById("cccccccccc").style.display = "none";
        }
        tabs.activeTab(tab);
        $("li[data-id='40000']").parent().children().removeClass('nav-active');
        $("li[data-id='40000']").addClass('nav-active');
        $('.home-except-box').show();
        $('.home-wrapper').stop().animate({opacity: 0}, 50);
        $('.nav-child-wrap ul li').removeClass('active');
        $("li[data-id='246736969695232']").parent().parent().children().removeClass('active');
        $("li[data-id='246736969695232']").parent().addClass('active');
        $("li[data-id='246736969695232']").addClass('active');
        document.getElementById('aliclass').className = 'dropdown';
        document.getElementById("cccccccccc").style.display = "none";
    }

    function toDoXj() {
        $("li[data-id='40000']").click();
        //根据权限，定义传参
        var jy_xj = "jy_xj";
        flag = 1;
        closeAllButFirst();
        if (hidden) {
            hidden = !hidden;
            $("#win1").hide();
        }
        var item = {
            iconCls: "iconfont icon-huise",
            id: "246736969695232",
            text: "预释放人员衔接",
            url: "/basic/public-tab/view"
        };
        var tabs = mini.get("mainTabs");
        var tab = tabs.getTab(item.id);
        if (!tab) {
            var url = item.url + "?id=" + item.id;
            if(level=='01' || level=='02' || level=='05'){
                url += "&"+jy_xj;
            }
            tab = {name: item.id, title: item.text, url: url, iconCls: item.iconCls, showCloseButton: true};
            tabs.addTab(tab);
            $("li[data-id='40000']").parent().parent().children().removeClass('nav-active');
            document.getElementById("cccccccccc").style.display = "none";
        }
        tabs.activeTab(tab);
        $("li[data-id='40000']").parent().children().removeClass('nav-active');
        $("li[data-id='40000']").addClass('nav-active');
        $('.home-except-box').show();
        $('.home-wrapper').stop().animate({opacity: 0}, 50);
        $('.nav-child-wrap ul li').removeClass('active');
        $("li[data-id='246736969695232']").parent().parent().children().removeClass('active');
        $("li[data-id='246736969695232']").parent().addClass('active');
        $("li[data-id='246736969695232']").addClass('active');
        document.getElementById('aliclass').className = 'dropdown';
        document.getElementById("cccccccccc").style.display = "none";
    }

    function toDoSbSfj() {
        $("li[data-id='40000']").click();
        flag = 1;
        closeAllButFirst();
        if (hidden) {
            hidden = !hidden;
            $("#win1").hide();
        }
        var item = {
            iconCls: "fa fa-bell-o",
            id: "246736963534848",
            text: "预安置人员核查",
            url: "/basic/public-tab/view"
        };
        var tabs = mini.get("mainTabs");
        var tab = tabs.getTab(item.id);
        if (!tab) {
            var url = item.url + "?id=" + item.id;
            tab = {name: item.id, title: item.text, url: url, iconCls: item.iconCls, showCloseButton: true};
            tabs.addTab(tab);
            $("li[data-id='40000']").parent().parent().children().removeClass('nav-active');
            document.getElementById("cccccccccc").style.display = "none";
        }
        tabs.activeTab(tab);
        $("li[data-id='40000']").parent().children().removeClass('nav-active');
        $("li[data-id='40000']").addClass('nav-active');
        $('.home-except-box').show();
        $('.home-wrapper').stop().animate({opacity: 0}, 50);
        $('.nav-child-wrap ul li').removeClass('active');
        $("li[data-id='246736963534848']").parent().parent().children().removeClass('active');
        $("li[data-id='246736963534848']").parent().addClass('active');
        $("li[data-id='246736963534848']").addClass('active');
        document.getElementById('aliclass').className = 'dropdown';
        document.getElementById("cccccccccc").style.display = "none";
    }

    /**
     *  申请解除帮教（司法所页面跳转）
     */
    function toDoJcbj() {
        skipPublic('iconfont icon-jiechubangjiaoguanli','247110443974656','解除帮教管理','/basic/public-list/view','70000','ldtx');
    }

    /**
     *  跳转户籍迁出人员管理 户籍迁入地拒绝，迁出地司法所/司法局通知
     */
    function toDoHjQc() {
        skipPublic('iconfont iconfont icon-bangjiaoduixiangxinxiguanli','260324667031552','户籍迁移管理','/basic/public-tab/view','70000','hjqc');
    }

    /**
     *  跳转户籍迁入人员管理（司法所户籍迁入待接收,司法局户籍迁入申请）
     */
    function toDoHjQr() {
        skipPublic('iconfont iconfont icon-bangjiaoduixiangxinxiguanli','260324667031552','户籍迁移管理','/basic/public-tab/view','70000','hjqr');
    }

    /**
     * 查询监狱需要核查任务
     */
    function getDialogListHc() {
        var dialogStr = '';
        $.ajax({
            url: '/azbj/notice/list?type=1',
            type: 'GET',
            datatype: 'json',
            success: function (data) {
                data = JSON.parse(data);
                if (data.length) {
                    for (var i = 0, len = data.length; i < len; i++) {
                        dialogStr += '<ul class="live">';
                        dialogStr += '<li onclick="toDoHc()" style="font-size:medium;color:black;">&nbsp;&nbsp;系统提醒您,姓名:&nbsp;<font style="color:#0b80ef">' + data[i].name + '</font>&nbsp;的预安置人员,&nbsp;&nbsp;<font style="color:#0b80ef">' + data[i].addTime + '</font>&nbsp;&nbsp;入监,请您尽快录入完整信息,并完成发起核查的工作!</br></li>';
                        dialogStr += '</ul>';
                        dialogStr += '</li></br>';
                    }
                    if (data.length > 98) {
                        dialogStr += '<ul class="live">';
                        dialogStr += '<li onclick="toDoHc()" style="font-size:medium;color:black;">&nbsp;&nbsp;查看更多</br></li>';
                        dialogStr += '</ul>';
                        dialogStr += '</li></br>';
                    }
                } else {
                    dialogStr = "<div style='padding: 50px 0 0;text-align: center;font-size: 18px;'>暂无待发起核查任务</div>"
                }
                $('.dialog-box1').html(dialogStr);
            }
        })
    }

    /**
     * 查询司法所需要完成核查任务
     */
    function getDialogListDoHc() {
        var dialogStr = '';
        $.ajax({
            url: '/azbj/notice/list?type=2',
            type: 'GET',
            datatype: 'json',
            success: function (data) {
                data = JSON.parse(data);
                if (data.length) {
                    for (var i = 0, len = data.length; i < len; i++) {
                        dialogStr += '<ul class="live">';
                        dialogStr += '<li onclick="toDoHc()" style="font-size:medium;color:black;">&nbsp;&nbsp;系统提醒您,姓名:&nbsp;<font style="color:#0b80ef">' + data[i].name + '</font>&nbsp;的预安置人员,&nbsp;&nbsp;<font style="color:#0b80ef">' + data[i].cjDate + '</font>&nbsp;&nbsp;出监,请您尽快确认信息,完成核查的工作!</br></li>';
                        dialogStr += '</ul>';
                        dialogStr += '</li></br>';
                    }
                    if (data.length > 98) {
                        dialogStr += '<ul class="live">';
                        dialogStr += '<li onclick="toDoHc()" style="font-size:medium;color:black;">&nbsp;&nbsp;查看更多</br></li>';
                        dialogStr += '</ul>';
                        dialogStr += '</li></br>';
                    }
                } else {
                    dialogStr = "<div style='padding: 50px 0 0;text-align: center;font-size: 18px;'>暂无待完成核查任务</div>"
                }
                $('.dialog-box2').html(dialogStr);
            }
        })
    }

    /**
     * 查询司法局需要完成核查任务
     */
    function getDialogListDoHcSfj() {
        var dialogStr = '';
        $.ajax({
            url: '/azbj/notice/list?type=5',
            type: 'GET',
            datatype: 'json',
            success: function (data) {
                data = JSON.parse(data);
                if (data.length) {
                    for (var i = 0, len = data.length; i < len; i++) {
                        dialogStr += '<ul class="live">';
                        dialogStr += '<li onclick="toDoHcSfj()" style="font-size:medium;color:black;">&nbsp;&nbsp;系统提醒您,姓名:&nbsp;<font style="color:#0b80ef">' + data[i].name + '</font>&nbsp;的预安置人员,&nbsp;&nbsp;<font style="color:#0b80ef">' + data[i].cjDate + '</font>&nbsp;&nbsp;出监,请您尽快确认信息,完成核查的工作!</br></li>';
                        dialogStr += '</ul>';
                        dialogStr += '</li></br>';
                    }
                    if (data.length > 98) {
                        dialogStr += '<ul class="live">';
                        dialogStr += '<li onclick="toDoHcSfj()" style="font-size:medium;color:black;">&nbsp;&nbsp;查看更多</br></li>';
                        dialogStr += '</ul>';
                        dialogStr += '</li></br>';
                    }
                } else {
                    dialogStr = "<div style='padding: 50px 0 0;text-align: center;font-size: 18px;'>暂无待完成核查任务</div>"
                }
                // 给代办工作列表赋值
                $('.dialog-box5').html(dialogStr);
            }
        })
    }

    /**
     * 查询司法局/地市/省厅需要完成待办任务
     */
    function selectCountDoSb() {
        var dialogStr = '';
        $.ajax({
            url: '/azbj/notice/list?type=7',
            type: 'GET',
            datatype: 'json',
            success: function (data) {
                data = JSON.parse(data);
                if (data.length) {
                    for (var i = 0, len = data.length; i < len; i++) {
                        dialogStr += '<ul class="live">';
                        dialogStr += '<li onclick="toDoSbSfj()" style="font-size:medium;color:black;">&nbsp;&nbsp;系统提醒您,姓名:&nbsp;<font style="color:#0b80ef">' + data[i].name + '</font>&nbsp;的待推送人员,&nbsp;&nbsp;<font style="color:#0b80ef">' + data[i].cjDate + '</font>&nbsp;&nbsp;出监,请您尽快确认信息,完成推送的工作!</br></li>';
                        dialogStr += '</ul>';
                        dialogStr += '</li></br>';
                    }
                    if (data.length > 98) {
                        dialogStr += '<ul class="live">';
                        dialogStr += '<li onclick="toDoSbSfj()" style="font-size:medium;color:black;">&nbsp;&nbsp;查看更多</br></li>';
                        dialogStr += '</ul>';
                        dialogStr += '</li></br>';
                    }
                } else {
                    dialogStr = "<div style='padding: 50px 0 0;text-align: center;font-size: 18px;'>暂无待推送任务</div>"
                }
                $('.dialog-box5').html(dialogStr);
            }
        })
    }

    /**
     * 查询监狱发起衔接任务
     */
    function getDialogListXj() {
        var dialogStr = '';
        $.ajax({
            url: '/azbj/notice/list?type=3',
            type: 'GET',
            datatype: 'json',
            success: function (data) {
                data = JSON.parse(data);
                if (data.length) {
                    for (var i = 0, len = data.length; i < len; i++) {
                        dialogStr += '<ul class="live">';
                        dialogStr += '<li onclick="toDoXj()" " style="font-size:medium;color:black;">&nbsp;&nbsp;系统提醒您,姓名:&nbsp;<font style="color:#0b80ef">' + data[i].name + '</font>&nbsp;的预安置人员,&nbsp;&nbsp;<font style="color:#0b80ef">' + data[i].cjDate + '</font>&nbsp;&nbsp;出监,请您尽快补录信息,完成发起衔接的工作!</br></li>';
                        dialogStr += '</ul>';
                        dialogStr += '</li></br>';
                    }
                    if (data.length > 98) {
                        dialogStr += '<ul class="live">';
                        dialogStr += '<li onclick="toDoXj()" style="font-size:medium;color:black;">&nbsp;&nbsp;查看更多</br></li>';
                        dialogStr += '</ul>';
                        dialogStr += '</li></br>';
                    }
                } else {
                    dialogStr = "<div style='padding: 50px 0 0;text-align: center;font-size: 18px;'>暂无待发起衔接任务</div>"
                }
                $('.dialog-box3').html(dialogStr);
            }
        })
    }

    /**
     * 查询司法所需要完成衔接任务
     */
    function getDialogListDoXj() {
        var dialogStr = '';
        $.ajax({
            url: '/azbj/notice/list?type=4',
            type: 'GET',
            datatype: 'json',
            success: function (data) {
                data = JSON.parse(data);
                if (data.length) {
                    for (var i = 0, len = data.length; i < len; i++) {
                        dialogStr += '<ul class="live">';
                        dialogStr += '<li onclick="toDoXj()" style="font-size:medium;color:black;">&nbsp;&nbsp;系统提醒您,姓名:&nbsp;<font style="color:#0b80ef">' + data[i].name + '</font>&nbsp;的预释放人员,&nbsp;&nbsp;<font style="color:#0b80ef">' + data[i].cjDate + '</font>&nbsp;&nbsp;出监,请您尽快确认信息,完成衔接的工作!</br></li>';
                        dialogStr += '</ul>';
                        dialogStr += '</li></br>';
                    }
                    if (data.length > 98) {
                        dialogStr += '<ul class="live">';
                        dialogStr += '<li onclick="toDoXj()" style="font-size:medium;color:black;">&nbsp;&nbsp;查看更多</br></li>';
                        dialogStr += '</ul>';
                        dialogStr += '</li></br>';
                    }
                } else {
                    dialogStr = "<div style='padding: 50px 0 0;text-align: center;font-size: 18px;'>暂无待完成衔接任务</div>"
                }
                $('.dialog-box4').html(dialogStr);
            }
        })
    }

    /**
     * 查询司法所需要完成解除帮教任务
     */
    function getDialogListDoJc() {
        var dialogStr = '';
        var level= $("#level").val();
        $.ajax({
            url: '/azbj/notice/list?type=6',
            type: 'GET',
            datatype: 'json',
            success: function (data) {
                data = JSON.parse(data);
                if (data.length) {
                    if (level == "03"){
                        for (var i = 0, len = data.length; i < len; i++) {
                            dialogStr += '<ul class="live">';
                            dialogStr += '<li onclick="toDoJcbj()" style="font-size:medium;color:black;">&nbsp;&nbsp;系统提醒您,安置帮教人员&nbsp;<font style="color:#0b80ef">' + data[i].name + '</font>&nbsp;,于&nbsp;&nbsp;<font style="color:#0b80ef">' + data[i].releaseDate + '</font>&nbsp;&nbsp;期满自动解除帮教!</br></li>';
                            dialogStr += '</ul>';
                            dialogStr += '</li></br>';
                        }
                        if (data.length > 98) {
                            dialogStr += '<ul class="live">';
                            dialogStr += '<li onclick="toDoJcbj()" style="font-size:medium;color:black;">&nbsp;&nbsp;查看更多</br></li>';
                            dialogStr += '</ul>';
                            dialogStr += '</li></br>';
                        }
                    }else if (level == "08"){
                        for (var i = 0, len = data.length; i < len; i++) {
                            dialogStr += '<ul class="live">';
                            dialogStr += '<li style="font-size:medium;color:black;">&nbsp;&nbsp;系统提醒您, <font style="color:#0b80ef">' + data[i].sfsname + '</font> 所负责的安置帮教人员&nbsp;<font style="color:#0b80ef">' + data[i].name + '</font>&nbsp;,&nbsp;&nbsp;于<font style="color:#0b80ef">' + data[i].releaseDate + '</font>&nbsp;&nbsp;期满自动解除帮教!</br></li>';
                            dialogStr += '</ul>';
                            dialogStr += '</li></br>';
                        }
                    }
                } else {
                    dialogStr = "<div style='padding: 50px 0 0;text-align: center;font-size: 18px;'>暂无解除帮教任务</div>"
                }
                $('.dialog-box6').html(dialogStr);
            }
        })
    }
    //*********************************************工作提醒相关 - 结束*********************************************

    //============================================轮训查看是否多次登录=============================================
    var flag1 = true;
    var remoteLoginState = '${remoteLoginState}';
    if (remoteLoginState) {
        window.setInterval(checkUserState, 1000 * 4);
        function checkUserState() {
            if(flag1) {
                $.ajax({
                    url: "/front/checkUserState",
                    type: "GET",
                    success: function (data) {
                        if("" != data) {
                            if (data == "REMOTELOGIN") {
                                mini.alert("该账号已在别处登录，点击退出？",
                                    "",
                                    function (action) {
                                        if (action == "ok") {
                                            window.location.href = "/logout";
                                        }
                                    });
                            } else if(data == "TIMEOUT"){
                                mini.alert("登录超时，请重新登录！",
                                    "",
                                    function (action) {
                                        if (action == "ok") {
                                            window.location.href = "/logout";
                                        }
                                    });
                            }
                            flag1 = false;
                        }
                    }
                })
            }
        }
    }

    /**
     * 公共跳转方法
     * @param childICO 要跳转到的子图标
     * @param childId 要跳转到的子id
     * @param childName 要跳转到的子名称
     * @param childUrl 要跳转到的子模板链接
     * @param topNavId 上面的导航栏按钮id
     * @param different 返回不同，方便区分跳转页面
     */
    function skipPublic(childICO,childId,childName,childUrl,topNavId,different) {
        $("li[data-id="+topNavId+"]").click();
        flag = 1;
        closeAllButFirst();
        if (hidden) {
            hidden = !hidden;
            $("#win1").hide();
        }
        var item = {
            iconCls: childICO,
            id: childId,
            text: childName,
            url: childUrl
        };
        var tabs = mini.get("mainTabs");
        var tab = tabs.getTab(item.id);
        if (!tab) {
            var url = item.url + "?id=" + item.id + "&"+different;
            tab = {name: item.id, title: item.text, url: url, iconCls: item.iconCls, showCloseButton: true};
            tabs.addTab(tab);
            $("li[data-id=topNavId]").parent().parent().children().removeClass('nav-active');
            document.getElementById("cccccccccc").style.display = "none";
        }
        tabs.activeTab(tab);
        $("li[data-id="+topNavId+"]").parent().children().removeClass('nav-active');
        $("li[data-id="+topNavId+"]").addClass('nav-active');
        $('.home-except-box').show();
        $('.home-wrapper').stop().animate({opacity: 0}, 50);
        $('.nav-child-wrap ul li').removeClass('active');
        $("li[data-id="+childId+"]").parent().parent().children().removeClass('active');
        $("li[data-id="+childId+"]").parent().addClass('active');
        $("li[data-id="+childId+"]").addClass('active');
        document.getElementById('aliclass').className = 'dropdown';
        document.getElementById("cccccccccc").style.display = "none";
    }

    /**
     * 查询区县司法局审批户籍迁出申请任务
     */
    function a111() {
        var dialogStr = '';
        $.ajax({
            url: '/azbj/notice/list?type=8',
            type: 'GET',
            datatype: 'json',
            success: function (data) {
                data = JSON.parse(data);
                if (data.length) {
                    for (var i = 0, len = data.length; i < len; i++) {
                        dialogStr += '<ul class="live">';
                        dialogStr += '<li onclick="toDoHjQc()" style="font-size:larger;color:black;">&nbsp;&nbsp;系统提醒您,姓名:&nbsp;<font style="color:#0b80ef">' + data[i].name + '</font>&nbsp;的安置帮教人员,&nbsp;&nbsp;<font style="color:#0b80ef">' + data[i].addTime + '</font>&nbsp;&nbsp;申请户籍迁出,请您尽快确认信息,完成迁出审批工作!</br></li>';
                        dialogStr += '</ul>';
                        dialogStr += '</li></br>';
                    }
                    if(data.length>98){
                        dialogStr += '<ul class="live">';
                        dialogStr += '<li onclick="toDoHjQc()" style="font-size:larger;color:black;">&nbsp;&nbsp;查看更多</br></li>';
                        dialogStr += '</ul>';
                        dialogStr += '</li></br>';
                    }
                } else {
                    dialogStr = "<div style='padding: 50px 0 0;text-align: center;font-size: 18px;'>暂无消息</div>"
                }
                $('.dialog-box7').html(dialogStr);
            }
        })
    }

    /**
     * 查询区县司法局审批户籍迁入申请任务
     */
    function a222() {
        var dialogStr = '';
        $.ajax({
            url: '/azbj/notice/list?type=9',
            type: 'GET',
            datatype: 'json',
            success: function (data) {
                data = JSON.parse(data);
                if (data.length) {
                    for (var i = 0, len = data.length; i < len; i++) {
                        dialogStr += '<ul class="live">';
                        dialogStr += '<li onclick="toDoHjQr()" style="font-size:larger;color:black;">&nbsp;&nbsp;系统提醒您,姓名:&nbsp;<font style="color:#0b80ef">' + data[i].name + '</font>&nbsp;的安置帮教人员,&nbsp;&nbsp;<font style="color:#0b80ef">' + data[i].addTime + '</font>&nbsp;&nbsp;申请户籍迁入,请您尽快确认信息,完成迁出审批工作!</br></li>';
                        dialogStr += '</ul>';
                        dialogStr += '</li></br>';
                    }
                    if(data.length>98){
                        dialogStr += '<ul class="live">';
                        dialogStr += '<li onclick="toDoHjQr()" style="font-size:larger;color:black;">&nbsp;&nbsp;查看更多</br></li>';
                        dialogStr += '</ul>';
                        dialogStr += '</li></br>';
                    }
                } else {
                    dialogStr = "<div style='padding: 50px 0 0;text-align: center;font-size: 18px;'>暂无消息</div>"
                }
                $('.dialog-box8').html(dialogStr);
            }
        })
    }

    /**
     * 查询区县司法局/迁出地司法所 迁出被迁入地司法局拒绝的条目
     */
    function a333() {
        var dialogStr = '';
        $.ajax({
            url: '/azbj/notice/list?type=10',
            type: 'GET',
            datatype: 'json',
            success: function (data) {
                data = JSON.parse(data);
                if (data.length) {
                    for (var i = 0, len = data.length; i < len; i++) {
                        dialogStr += '<ul class="live">';
                        dialogStr += '<li onclick="toDoHjQc()" style="font-size:larger;color:black;">&nbsp;&nbsp;系统提醒您,姓名:&nbsp;<font style="color:#0b80ef">' + data[i].name + '</font>&nbsp;的安置帮教人员,申请迁入地司法局拒绝,请您尽快确认信息!</br></li>';
                        dialogStr += '</ul>';
                        dialogStr += '</li></br>';
                    }
                    if(data.length>98){
                        dialogStr += '<ul class="live">';
                        dialogStr += '<li onclick="toDoHjQc()" style="font-size:larger;color:black;">&nbsp;&nbsp;查看更多</br></li>';
                        dialogStr += '</ul>';
                        dialogStr += '</li></br>';
                    }
                } else {
                    dialogStr = "<div style='padding: 50px 0 0;text-align: center;font-size: 18px;'>暂无消息</div>"
                }
                $('.dialog-box9').html(dialogStr);
            }
        })
    }

    /**
     * 查询迁入地司法所接收，迁出地司法所通知
     */
    function a444() {
        var dialogStr = '';
        $.ajax({
            url: '/azbj/notice/list?type=11',
            type: 'GET',
            datatype: 'json',
            success: function (data) {
                data = JSON.parse(data);
                if (data.length) {
                    for (var i = 0, len = data.length; i < len; i++) {
                        dialogStr += '<ul class="live">';
                        dialogStr += '<li onclick="toDoHjQc()" style="font-size:larger;color:black;">&nbsp;&nbsp;系统提醒您,姓名:&nbsp;<font style="color:#0b80ef">' + data[i].name + '</font>&nbsp;的安置帮教人员,迁入地已接收,请您尽快确认信息!</br></li>';
                        dialogStr += '</ul>';
                        dialogStr += '</li></br>';
                    }
                    if(data.length>98){
                        dialogStr += '<ul class="live">';
                        dialogStr += '<li onclick="toDoHjQc()" style="font-size:larger;color:black;">&nbsp;&nbsp;查看更多</br></li>';
                        dialogStr += '</ul>';
                        dialogStr += '</li></br>';
                    }
                } else {
                    dialogStr = "<div style='padding: 50px 0 0;text-align: center;font-size: 18px;'>暂无消息</div>"
                }
                $('.dialog-box10').html(dialogStr);
            }
        })
    }

    /**
     * 户籍迁入司法所接收通知
     */
    function a2221() {
        var dialogStr = '';
        $.ajax({
            url: '/azbj/notice/list?type=12',
            type: 'GET',
            datatype: 'json',
            success: function (data) {
                data = JSON.parse(data);
                if (data.length) {
                    for (var i = 0, len = data.length; i < len; i++) {
                        dialogStr += '<ul class="live">';
                        dialogStr += '<li onclick="toDoHjQr()" style="font-size:larger;color:black;">&nbsp;&nbsp;系统提醒您,姓名:&nbsp;<font style="color:#0b80ef">' + data[i].name + '</font>&nbsp;的安置帮教人员,&nbsp;&nbsp;<font style="color:#0b80ef">' + data[i].addTime + '</font>&nbsp;&nbsp;申请户籍迁入,请您尽快确认信息,完成接收工作!</br></li>';
                        dialogStr += '</ul>';
                        dialogStr += '</li></br>';
                    }
                    if(data.length>98){
                        dialogStr += '<ul class="live">';
                        dialogStr += '<li onclick="toDoHjQr()" style="font-size:larger;color:black;">&nbsp;&nbsp;查看更多</br></li>';
                        dialogStr += '</ul>';
                        dialogStr += '</li></br>';
                    }
                } else {
                    dialogStr = "<div style='padding: 50px 0 0;text-align: center;font-size: 18px;'>暂无消息</div>"
                }
                $('.dialog-box11').html(dialogStr);
            }
        })
    }

</script>